home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
011
/
stuffit.arc
/
DELFILE.ASM
< prev
next >
Wrap
Assembly Source File
|
1985-11-18
|
640b
|
40 lines
comment ~
delete file
On entry:
DX address of ASCIIZ string of file to be deleted
Error return if CY is set:
2 File not found
5 Access denied
~
;----------------------------------------------------------
; constants and messages
df_msg db cr,lf,'delfile: ',eos
;----------------------------------------------------------
; main code
delfile proc near
mov ah,41h ;delete file from directory function
int 21h
jc delf_err
ret
delf_err:
push ax ;save error code
mov dx,offset df_msg
mov ah,9h
int 21h
pop ax
call errmsg
stc
ret
delfile endp